#coding=UTF-8
import requests
import json

# 引入自定义的keystone模块
import keystone
keystone_s=keystone.getToken()

#nova(compute)端点地址：
compute_url="http://192.168.100.10:8774/v2.1/os-volumes/"
#定义请求头
headers={
    "X-Auth-Token":keystone_s['token']
}
volume_id="cc03e285-5b37-438f-b3bc-20b4c21a8594"
#发送请求
req=requests.delete(compute_url+volume_id,headers=headers)
print(req.status_code)
if req.status_code==202:
    print("删除成功")
